MAKE                =	make
CC                  =	g++
INCPATH             =   ./
EXE                 =   test
CPPOX               =   -std=c++0x
LINK                =	-g -pedantic -Wall -lstdc++ -lpthread -ldl -lm -Wl,-rpath,.
COMPILE	            =	-g -O0 $(CPPOX) -D_THREAD_SAFE -Wextra -pedantic -Wall -c -fPIC -Wno-deprecated 
SRCS                =   $(shell ls *.cpp)
OBJS                =   $(subst .cpp,.o,$(SRCS))

.SUFFIXES: .o .cpp

.cpp.o:
	$(CC) -I $(INCPATH) $(COMPILE) $<

.c.o:
	$(CC) -I $(INCPATH) $(COMPILE) $<

all: $(OBJS) $(OBJS_C)
	$(CC) -o $(EXE) $(OBJS) -L. $(LINK) 

-include depend.mak

depend:
	g++ -MM $(SRCS) > depend.mak

clean:
	rm -rf $(OBJS) depend.mak $(EXE)
